﻿#include <iostream>
#include <cstring>
#include "../head/Bank.hh"
#include "../head/Customer.hh"
#include "../head/menu.hh"

int main() {
    Menu menu;

    while (true) {
        menu.showMainMenu();
        std::string choice;
        std::getline(std::cin, choice);

        if (choice.length() != 1) {
            std::cout << "Invalid choice, please try again.\n";
            system("pause");
            system("cls");
            continue;
        }

        switch (choice[0]) {
        case '1':
            menu.registerCustomer();
            break;
        case '2':
            menu.accessCustomerAccounts();
            break;
        case '3':
            menu.displayAllBankAccounts();
            break;
        case '4':
            menu.generateTransactionReport();
            break;
        case '5':
            std::cout << "Exiting the program.\n";
            return 0;
        default:
            std::cout << "Invalid choice, please try again.\n";
        }
    }

    return 0;
}
